#!/usr/bin/env python

import asyncio
from websockets.sync.client import connect


def hello():
    with connect("ws://localhost:8899") as websocket:
        websocket.send("Hello world!")
        message = websocket.recv()
        print(f"Received: {message}")

        while True:
            send = input("Enter:")
            websocket.send(send)
            recv = websocket.recv()
            print(f">>> {recv}")


hello()
